<?php

namespace App\Http\Resources;

use Illuminate\Http\Resources\Json\JsonResource;
use App\Models\User;
class UserResource extends JsonResource
{
    /**
     * Transform the resource into an array.
     *
     * @param  \Illuminate\Http\Request  $request
     * @return array
     */
    public function toArray($request)
    {
        $this->resource->makeHidden(User::$hidden_arr);

        $data =  parent::toArray($request);
//        $data[''] = $this->resource->phone ; //样品
//        $data['phone_bind'] = $this->resource->phone?true:false;
        return  $data;
    }
}
